#ifndef LOGIC_H_
#define LOGIC_H_

#include "world/map.h"
#include "world/action.h"

#define MONSTER_AGGRESSION_RADIUS 3 // TODO: more generic solution

// Set the damage_handler after calling logic_reset(). 
// When the game logic detects a hit with a weapon, this function is called.
extern void (*damage_handler) (int time, Coord where, int attacker, int victim, int weapon, int damage);

void logic_reset ();
void logic_update (Map* map);
void logic_intend (Action* action);
bool action_is_valid (Map* map, Action* action);
int time_asap (int actor_id);

#endif
